    <script  type ="text/javascript">
  var sh;
                var marquee_type = document.getElementById("marquee_type").value;
                var lk1 = document.getElementById("lk1");
                var lk2 = document.getElementById("lk2");
                var marquee_run = document.getElementById("marquee_run");
                var speed = 10;

                function StopScroll() {
                    //stopscroll = true;
                    clearInterval(sh);
                }

                function scrollLeft() {
                    StopScroll();
                    marquee_type = "left";
                    lk2.innerHTML = lk1.innerHTML;
                   function Marquee() {
                        if (lk2.offsetWidth - marquee_run.scrollLeft <= 0)
                            marquee_run.scrollLeft -= lk1.offsetWidth;
                            
                        else {
                            marquee_run.scrollLeft++;
                        }
                    }
                    sh = setInterval(Marquee, speed);

                }
               function scrollRight() {
                    StopScroll();
                    marquee_type = "right";
                   //lk2.innerHTML = lk1.innerHTML;
                    marquee_run.scrollRight = marquee_run.scrollWidth;
                    function Marquee2() {
                        if (marquee_run.scrollLeft <= 0)
                            marquee_run.scrollLeft += lk1.offsetWidth;
                        else {
                            marquee_run.scrollLeft--;
                        }
                    }
                    sh = setInterval(Marquee2, speed);
                }

                function Left() {
                    //stopscroll = false;
                    scrollLeft();
                }

                function Right() { 
                    //stopscroll = false;
                    scrollRight();
                }
               


                marquee_run.onmouseover = function() { StopScroll(); }
                marquee_run.onmouseout = function() {
                    if (marquee_type == "left") {
                        Left();
                    } else if (marquee_type == "right") {
                        //sh = setInterval(scrollRight,speed)
                        Right();
                    }
                }
                scrollRight();
                


